/**
 * 
 */
package graph;

import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import facility.Facility;

/**
 * @author xiaohui
 * 
 *         A NetEdge is a line segment
 */
public class NetEdge extends GraphEdge implements Comparable {

	public NetEdge(int id, GraphNode srcNode, GraphNode destNode) {
		super(id, srcNode, destNode);
	}

	private double computeWeight() {
		return this.getSrcNode().distance(this.getDestNode());
	}

	@Override
	public int compareTo(Object obj) {
		NetEdge e = (NetEdge) obj;
		if (this.getScore() > e.getScore()) {
			return 1;
		} else if (this.getScore() < e.getScore()) {
			return -1;

		} else {
			return 0;
		}
	}

}
